//
// Created by LiuYou on 2021/8/7.
//

#ifndef SERVER_HPP
#define SERVER_HPP


namespace NetRadio {

    static char DEFAULT_MEDIA_DIR[] = "/var/media";
    static const char DEFAULT_IF[] = "eth0";

    enum {
        RUN_DAEMON = 1,
        RUN_FOREGROUND
    };

    namespace Server {
        struct ServerConfig {
            char* rcvPort;
            char* multiGroup;
            char* mediaDir;
            char runMode;
            char* ifName;

        };

//        extern struct Server::ServerConfig serverConfig;
//        extern int socketFd;
//        extern struct sockaddr_in senderAddress;
    }

}


extern struct NetRadio::Server::ServerConfig serverConfig;
extern int socketFd;
extern struct sockaddr_in senderAddress;


#endif //SERVER_HPP
